<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>CMS前台用户登录</title>

    <!-- Bootstrap -->
    <link href="__PUBLIC__/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/assets/admin/css/common.css">

    <script src="https://__PUBLIC__/vendor/bootstrap/cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://__PUBLIC__/vendor/bootstrap/cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="container"style="width:880px;">
    <h2 style="text-align: center;">用户登录</h2>
    <form class="form-horizontal" action="__SELF__" method="post">
        <div class="form-group">
            <label class="col-sm-2 col-sm-offset-2 control-label register_user ">用户名</label>
            <div class="col-sm-6">
                <input type="text" class="form-control" name="username" placeholder="请输入用户名">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 col-sm-offset-2 control-label register_user">密 码</label>
            <div class="col-sm-6">
                <input type="password" class="form-control" name="password" placeholder="请输入密码">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 col-sm-offset-2 control-label register_user">验证码</label>
            <div class="col-sm-3">
                <input type="text" class="form-control" name="code" placeholder="请输入验证码">
            </div>
            <div class="col-sm-3">
                <img src="" id="verify" style="cursor: pointer;">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-6">
                <button style="margin-left: 150px;" type="submit" class="btn btn-info">登 录</button>
            </div>
        </div>
    </form>
    <div><a href="{{:U('register')}}" style="float:right;" style="margin-left: 750px;">您还没有账号，请先注册后登录~</a></div>
</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="__PUBLIC__/vendor/bootstrap/js/bootstrap.min.js"></script>
<script>
    $(function () {
        function set_verify() {
            var src = "{{:U('Index/verify')}}" + '?' + Math.random();
            $("#verify").attr('src', src); //attr设置值
        }

        set_verify();

        $("#verify").click(function () {
            set_verify();
        })
    })
</script>
</body>
</html>